<?php
	defined( "AZ_EXE_" ) or die ( "ERROR : CORE VARIABLE IS NOT DEFINED." );
	class Import extends AZ {
		public static function controller( $controllerName ){
			Basic::requireFile( CORE_APP_FOLDER . "Controller.php" );
			Basic::requireFile( CONTROLLER_FOLDER . Basic::formatControllerName($controllerName) . ".php" );
		}
		public static function model( $modelName ){
			Basic::requireFile( CORE_APP_FOLDER . "Model.php" );
			Basic::requireFile( MODEL_FOLDER . Basic::formatModelName($modelName) . ".php" );
		}
		public static function datasource( $datasourceName ){
			Basic::requireFile( DATASOURCE_FOLDER . $datasourceName . ".php" );
		}
		public static function vendor($fileName){
			if ( substr( $fileName , strpos( $fileName , "." ) , strlen($fileName) ) == ".php" ){
				Basic::requireFile( VENDOR_FOLDER . $fileName );
			}
			elseif( substr( $fileName , strpos( $fileName , "." ) , strlen($fileName) ) == ".js" ){
				echo '<script type="text/javascript" src="vendor/'. $fileName .'" ></script>' . "\n" ;
			}
		}
		public static function util( $fileName ){
			Basic::requireFile( UTIL_FOLDER . $fileName . ".php" );
		}
		public static function locale( $fileName ){
			Basic::requireFile( APP_LOCALE_FOLDER . Basic::formatLanguageName( $fileName ) . ".php" );
		}
		public static function html(){
			Basic::requireFile( CORE_HTML_FOLDER . "Element.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "Input.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "UL.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "Combo.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "ComboOptGroup.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "Image.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "Table.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "Tab.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "TextArea.php" );
			Basic::requireFile( CORE_HTML_FOLDER . "HTML.php" );
		}
		public static function js( $jsName ){
			echo '<script type="text/javascript" src="'. JS_FOLDER . $jsName . ".js" .'" ></script>' . "\n" ;
		}
		public static function css( $cssName ){
			echo '<link type="text/css" rel="stylesheet" href="'. CSS_FOLDER . $cssName . ".css" .'" />' . "\n"  ;
		}
		public static function AppLib( $fileName ){
			Basic::requireFile( APP_LIBS_FOLDER . $fileName . ".php" );
		}
	}
?>
